/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.io.File;

/**
 * <p>Project: javase - Dir3
 * <p>Powered by webrx On 2021-12-13 15:32:30
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Dir3 {
    public static void main(String[] args) {
        String c = "c:/";

        //File
        File f = new File(c);
        //判断file是不是目录
        System.out.println(f.isDirectory());
        //输出路径
        System.out.println(f.getAbsoluteFile());
        System.out.println(f.getAbsolutePath());
        //获取当前对象中所有对象的名称 String[]
        String[] fsn = f.list();
        System.out.println(fsn.length);
        //获取f对象所有File File[]
        File[] fs = f.listFiles();
        System.out.println(fs.length);
    }
}
